package com.example.volunteer.service;


import com.example.volunteer.model.Volunteer;
import com.example.volunteer.util.PageResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public interface VolunteerService {
    void register(Volunteer volunteer);
    void update(Volunteer volunteer);
    Volunteer findById(String volunteerId);
    Volunteer findByEmail(String volunteerEmail);
    void delete(String volunteerId);

    PageResult<Volunteer> findByIdWithPage(@Param("volunteerId") String volunteerId,@Param("offset") int offset, @Param("pageSize") int pageSize);
    PageResult<Volunteer> findVolunteersWithPage(@Param("offset") int offset, @Param("pageSize") int pageSize);
    PageResult<Volunteer> findByNameWithPage(@Param("name") String name, @Param("offset") int offset, @Param("pageSize") int pageSize);
    PageResult<Volunteer> findByEmailWithPage(@Param("email") String email, @Param("offset") int offset, @Param("pageSize") int pageSize);
    PageResult<Volunteer> findByContactWithPage(@Param("contact") String contact, @Param("offset") int offset, @Param("pageSize") int pageSize);

}
